<?php

declare(strict_types=1);

namespace Modules\Base\Models;

use Catch\Base\CatchModel as Model;

class OrderNumber extends Model
{

    protected $table = 'order_number';

    protected $fillable = ['id', 'prefix', 'today', 'num'];

    /**
     * @var array
     */
    protected array $fields = ['id', 'prefix', 'today', 'num'];

    /**
     * @var array
     */
    protected array $form = ['id', 'prefix', 'today', 'num'];

    /**
     * @var array
     */
    public array $searchable = [
        'id' => '=',
        'prefix'  => '=',
        'today'  => '=',
    ];

    /**
     * 时间格式化
     * @param $date
     * @return mixed
     */
    protected function serializeDate($date)
    {
        return $date->format('Y-m-d H:i');
    }


}
